<!--
 * @Author: coman
 * @LastEditors: coman
 * @Date: 2020-06-16 20:38:22
 * @motto: No pain,No gain
 * @LastEditTime: 2020-06-16 20:44:42
--> 
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- 创建一个对象，该对象存储一个学生的信息，该对象包含学号、身份证、年龄、性别、所学专业等属性信息，同时该对象包含一个自我介绍的方法，用来输出该对象的所有信息 -->
    <script>
        var obj={
            Id:2020,
            IDcard:44141413134,
            Name:'张三',
            age:22,
            sex:"男",
            major:"computer",
            fun:function(){
                console.log("我叫"+this.Name+"  性别是"+this.sex+"学号是:"+this.ID+"姓身份证为:"+this.IDcard+"所学专业:"+this.major);
                
            }
        }
        obj.fun();
    </script>
</body>
</html>